package com.youkeyi.ddy.cloud.common.api.application.business.crm.recipient;

import com.youkeyi.ddy.cloud.common.api.application.business.crm.recipient.dto.BusinessVaccineRecipientListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.recipient.param.BusinessVaccineRecipientCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.recipient.param.BusinessVaccineRecipientDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.recipient.param.BusinessVaccineRecipientListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.crm.recipient.param.BusinessVaccineRecipientUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 接种者
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】Vaccine Recipient Management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessVaccineRecipientCloudServiceFallback.class)
@RequestMapping("/business/vaccine/recipient")
public interface BusinessVaccineRecipientCloudService {

    // 查询接种者列表
    @ApiOperation(value = "Query Business Vaccine Recipient List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.doctor.BusinessVaccineRecipientCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessVaccineRecipientListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Business Vaccine Recipient List", dataType = "BusinessVaccineRecipientListCloudParam", dataTypeClass = BusinessVaccineRecipientListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessVaccineRecipientListCloudDto list(BusinessVaccineRecipientListCloudParam param);

    // 创建接种者
    @ApiOperation(value = "Create Business Vaccine Recipient", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.doctor.BusinessVaccineRecipientCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Business Vaccine Recipient", dataType = "BusinessVaccineRecipientCreateCloudParam", dataTypeClass = BusinessVaccineRecipientCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessVaccineRecipientCreateCloudParam param);


    // 编辑接种者
    @ApiOperation(value = "Update Business Vaccine Recipient", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.doctor.BusinessVaccineRecipientCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Business Vaccine Recipient", dataType = "BusinessVaccineRecipientUpdateCloudParam", dataTypeClass = BusinessVaccineRecipientUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessVaccineRecipientUpdateCloudParam param);


    // 删除接种者
    @ApiOperation(value = "Delete Business Vaccine Recipient", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.crm.doctor.BusinessVaccineRecipientCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Business Vaccine Recipient", dataType = "BusinessVaccineRecipientDeleteCloudParam", dataTypeClass = BusinessVaccineRecipientDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessVaccineRecipientDeleteCloudParam param);

}
